package chinaums.plugin.quartz;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Scheduled;
import org.springframework.stereotype.Component;

import chinaums.service.LongUrlLinkService;

/**
 * <p>Title:TransformLongUrlData</p>
 * <p>Description:定时长短链接转换</p>
 * @version v1.0
 * @author RenLei
 * 2017年8月2日
 */
@Component
public class TransformLongUrlData {
private static Logger log= LoggerFactory.getLogger(TransformLongUrlData.class);
@Autowired
private LongUrlLinkService linkService;
/**
 * 每隔一分钟执行一次该方法
 * 每一个小时执行一次 cron = 0 0 0/1 * * ? 
 * 0 0/1 * * * ? 
 * 0 0,3,6,9,12,15,18,21,24,27,30,33,36,39,42,45 * * * ?
 */
@Scheduled(cron = "0 0/2 * * * ?")
public void send(){
	log.info("进入长转短...");
	linkService.addUrl();
}
}
